import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('@/views/Home')
const Lists = () => import('@/views/Lists')
const Detail = () => import('@/views/Detail')

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/lists/:cid', component: Lists },
  { path: '/detail/:id', component: Detail }
]

const router = new VueRouter({
  routes
})

export default router
